import React from 'react'
import { withInfo } from '@storybook/addon-info'
import { DocsPage, DocsContainer } from '@storybook/addon-docs'
import '../src/styles/index.scss'

export const decorators = [
  (Story) => (
    <div style={{ padding: '20px 40px' }}>
      <h2>组件演示</h2>
      {Story()}
    </div>
  ),
  withInfo
]

export const parameters = {
  actions: { argTypesRegex: "^on[A-Z].*" },
  info: { inline: true, header: false },
  docs: {
    container: DocsContainer,
    page: DocsPage,
  },
  controls: {
    matchers: {
      color: /(background|color)$/i,
      date: /Date$/,
    },
  },
}